import QtQuick
import QtQuick.Controls

Window {
    width: 640
    height: 480
    visible: true
    title: qsTr("Hello World")

    ProgressBar {
        id: customProgressBar
        anchors.centerIn: parent
        width: 300
        height: 20
        value: 0.75

        background: Rectangle {
            implicitWidth: 300
            implicitHeight: 20
            color: "#e0e0e0"
            radius: 10
        }

        contentItem: Item {
            implicitWidth: 300
            implicitHeight: 20

            Rectangle {
                width: customProgressBar.visualPosition * parent.width
                height: parent.height
                color: "#21be2b"
                radius: 10
            }
        }
    }
}
